package com.polytech.diploma.SQLGenerator.Oracle.Statements.OrderByClause;

import java.util.List;
import java.util.Map;

import com.polytech.diploma.SQLGenerator.Oracle.Node;
import com.polytech.diploma.SQLGenerator.Oracle.Arguments.Argument;

public class OrderByClause implements Node{
	protected Argument orderByArg = null;
	protected List<OrderByType> orderByParams = null;
	
	public void setOrderByArg(Argument field)
	{
		orderByArg = field;
	}
	
	public void addOrderByParams(OrderByType param)
	{
		orderByParams.add(param);
	}

	public Argument getOrderByArg() {
		return orderByArg;
	}

	public List<OrderByType> getOrderByParams() {
		return orderByParams;
	}

	@Override
	public Map<String, List<String>> getTablesWithFields(
			Map<String, List<String>> fieldMap) {
		fieldMap = orderByArg.getTablesWithFields(fieldMap);
		
		return fieldMap;
	}
}
